package cn.com.connext.scrm.repository.master;

import cn.com.connext.scrm.domain.master.MerchantRoll;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

/**
 * @Description:
 * @author: ZHaoYul
 * @date: 2021/9/14 16:13
 */
@Repository
public interface MerchantRollRepository extends JpaRepository<MerchantRoll, String>,  JpaSpecificationExecutor {
    @Query(value = "select * from wx_busistocks_main_info  where coupon_code = ?1 and openid = ?2 and unionId = ?3", nativeQuery = true)
    MerchantRoll getMerchantRollByOne(String coupon_code, String openid, String unionId);
}
